package cn.ulc.socket.weapp.controller;

import cn.hutool.log.Log;
import cn.hutool.log.LogFactory;
import cn.ulc.common.model.param.PaginationParam;
import cn.ulc.common.util.Result;
import cn.ulc.socket.weapp.service.StaffOrderServ;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/wechat/staffOrder")
public class StaffOrderController {

    private static final Log log = LogFactory.get();

    @Autowired
    StaffOrderServ orderServ;

    @GetMapping("/")
    public Result findListPage( Boolean status, PaginationParam param){
        return Result.success(orderServ.findListPage(status,param));
    }
    @GetMapping("/{id}")
    public Result findDetail(@PathVariable("id") Long id){
        return Result.success(orderServ.findDetail(id));
    }
    //核销订单
    @PutMapping("/verifyStaffOrder/{id}")
    public Result verifyStaffOrder(@PathVariable("id") Long id){
        return Result.success(orderServ.verifyStaffOrder(id));
    }
}
